home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / C++ A'Link Files / Feb 91 / CPlus.Dev$ 2⁄22⁄91 / 0279-Ellipses-Feb91 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.0 KB  |  32 lines  |  [TEXT/GEOL]

  1. Item    2094962                         21-Feb-91        13:41PST
  2.  
  3. From:   TSD                             Encore, The Software Dept,PRT
  4.  
  5. To:     CPLUS.DEV$                      C++ Interest List--Developers
  6.  
  7. Item forwarded by       ALCABES      to CPLUS.APPLE$ 
  8.  
  9. ------------------------------------------------------------------------------
  10.  
  11. Sub:    Ellipses
  12.  
  13. Attn: CPlus Dev
  14. SentBy: Peter Marx
  15. Date:
  16.        2/20/91
  17. Time:
  18.        12:10 PM
  19. Subject:Ellipses
  20. Recently, Keith A Esau wrote:
  21.  
  22. "To get around these probelms, use the macros/functions defined in stdarg.h
  23. that are designed for stepping through the argument list."
  24.  
  25. But I don't think it's quite that easy.  You have to be aware of the promotion
  26. that occurs (or doesn't occur) on a particular machine when parameters are
  27. pushed in preparation for the function call.  For example, if you pass a float
  28. to a routine in Apple's MPW C, you retrieve it with "va_arg(p, extended)",
  29. since it was promoted from float to extended for the call.  Similarly for char
  30. becoming int, etc.
  31.  
  32.